package com.woniuxy.stage3demo.mapper.hpxmapper;


import com.woniuxy.stage3demo.bean.chenyuxuanBean.StaffBean;
import org.apache.ibatis.annotations.*;

@Mapper
public interface SystemMapper {

    //根据登录名、密码查询账号
    @ResultType(StaffBean.class)

    @Select("select id,name from staff " +
            "where login_name = #{loginName} and password = #{pwd}" +
            "and use_status = 0")
    StaffBean login(@Param("loginName") String loginName, @Param("pwd") String password);



    //根据登录名查询账号
    @ResultType(StaffBean.class)
    @Select("select id,name,login_name as loginName,password from staff " +
            "where login_name = #{loginName} and use_status = 0")
    StaffBean loginByName(@Param("loginName") String loginName);


}
